<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=a, initial-scale=1.0">
    <title>伪类选择器</title>
    <style>
        li:first-child{
            color:red;
            font-size: 24px;
        }
        li:last-child{
            color: blue;
            font-size: 24px;
        }
        li:nth-child(3){
            color: purple;
            font-size: 32px;
        }
        li:nth-last-child(2){
            color: skyblue;
            font-size: 32px;
        }
        li:nth-of-type(even){
            color: coral;
            font-size: 32px;
        }
    </style>
</head>
<body>
    <h2>家有儿女</h2>
    <ul>
        <li>老大</li>
        <li>老二</li>
        <li>老三</li>
        <li>老四</li>
        <li>老五</li>
        <li>老六</li>
    </ul>
</body>
</html>